<?php get_header(); ?>
<div id="container" class="cf">
<?php if ( is_category(4) ) { ?>
<div id="main" class="cat_mina">
<?php $post = $posts[0]; ?>
<?php if (is_category()) : ?>
<h3 class="archive"><?php single_cat_title(); ?>の一覧<span>(<?php 
global $wp_query;
echo $wp_query->found_posts;
 ?>件)</span></h3>
<?php endif; ?>
<div class="lists">
<?php
if (have_posts()) :
global $query_string;
query_posts( $query_string . "&posts_per_page=20&cat=4&paged=".$paged );
while (have_posts()) : the_post();
?>
<h2>
<?php $youtubeUrl = post_custom('youtube'); ?>
<a href="<?php the_permalink() ?>" class="listimg" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>"><img src="http://img.youtube.com/vi/<?= $youtubeUrl ?>/default.jpg" alt="<?php echo substr(strip_tags(the_title()), 0, 30);  ?>" class="list_yt" height="60" /></a>
<div class="list_right">
<a href="<?php the_permalink() ?>" class="listtex" rel="bookmark" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>">
<?php
if(mb_strlen($post->post_title,'UTF-8')>35) {
$title= mb_substr($post->post_title,0,35,'UTF-8');
echo $title.…;} else {
echo $post->post_title;}
?></a>
<span>(<?php the_time('m.d.Y'); ?>)</span>
</div>
</h2>
<?php endwhile; ?>
</div>
<?php navi(); ?>
<div class="fb-activity" data-site="http://8bitnews.asia/" data-width="640" data-height="300" data-header="false" data-colorscheme="dark" data-linktarget="_parent" data-border-color="#000000" data-font="tahoma" data-recommendations="true"></div>
<?php else : ?>
<h3 class="archive">Not Found</h3>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php } elseif ( is_category( array("556") ) ) { ?>
<div id="main" class="cat">
<div class="cat_pf"><img src="<?php echo home_url(); ?>/images/cat_pf.png" alt="Pay Forward" height="120" width="640" /></div>
<?php $post = $posts[0]; ?>
<?php if (is_category()) : ?>
<h3 class="archive"><?php single_cat_title(); ?>の一覧<span>(<?php 
global $wp_query;
echo $wp_query->found_posts;
 ?>件)</span></h3>
<?php endif; ?>
<div class="lists">
<?php
if (have_posts()) :
global $query_string;
query_posts( $query_string . "&posts_per_page=20&cat=556&paged=".$paged );
while (have_posts()) : the_post();
?>
<h2>
<?php $youtubeUrl = post_custom('youtube'); ?>
<a href="<?php the_permalink() ?>" class="listimg" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>"><img src="http://img.youtube.com/vi/<?= $youtubeUrl ?>/default.jpg" alt="<?php echo substr(strip_tags(the_title()), 0, 30);  ?>" class="list_yt" height="60" /></a>
<div class="list_right">
<a href="<?php the_permalink() ?>" class="listtex" rel="bookmark" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>">
<?php
if(mb_strlen($post->post_title,'UTF-8')>35) {
$title= mb_substr($post->post_title,0,35,'UTF-8');
echo $title.…;} else {
echo $post->post_title;}
?></a>
<span>(<?php the_time('m.d.Y'); ?>)</span>
</div>
</h2>
<?php endwhile; ?>
</div>
<?php navi(); ?>
<div class="fb-like-box" data-href="https://www.facebook.com/PayItForwardClass" data-width="640" data-colorscheme="dark" data-show-faces="false" data-stream="true" data-header="true"></div>
<?php else : ?>
<h3 class="archive">Not Found</h3>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php } elseif ( is_category( array("16") ) ) { ?>
<div id="main" class="cat_eve">
<?php $post = $posts[0]; ?>
<?php if (is_category()) : ?>
<h3 class="archive"><?php single_cat_title(); ?>の一覧<span>(<?php 
global $wp_query;
echo $wp_query->found_posts;
 ?>件)</span></h3>
<?php endif; ?>
<div class="lists">
<?php
if (have_posts()) :
global $query_string;
query_posts( $query_string . "&posts_per_page=25&cat=16&paged=".$paged );
while (have_posts()) : the_post();
?>
<h2>
<a href="<?php the_permalink() ?>" class="listtex" rel="bookmark" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>">
<?php
if(mb_strlen($post->post_title,'UTF-8')>50) {
$title= mb_substr($post->post_title,0,50,'UTF-8');
echo $title.…;} else {
echo $post->post_title;}
?></a>
<span>(<?php the_time('m.d.Y'); ?>)</span>
</h2>
<?php endwhile; ?>
</div>
<?php navi(); ?>
<div class="fb-activity" data-site="http://8bitnews.asia/" data-width="640" data-height="300" data-header="false" data-colorscheme="dark" data-linktarget="_parent" data-border-color="#000000" data-font="tahoma" data-recommendations="true"></div>
<?php else : ?>
<h3 class="archive">Not Found</h3>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php } elseif ( is_category( array("17") ) ) { ?>
<div id="main" class="cat_eve">
<?php $post = $posts[0]; ?>
<?php if (is_category()) : ?>
<h3 class="archive"><?php single_cat_title(); ?>の一覧<span>(<?php 
global $wp_query;
echo $wp_query->found_posts;
 ?>件)</span></h3>
<?php endif; ?>
<div class="lists">
<?php
if (have_posts()) :
global $query_string;
query_posts( $query_string . "&posts_per_page=25&cat=17&paged=".$paged );
while (have_posts()) : the_post();
?>
<h2>
<a href="<?php the_permalink() ?>" class="listtex" rel="bookmark" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>">
<?php
if(mb_strlen($post->post_title,'UTF-8')>50) {
$title= mb_substr($post->post_title,0,50,'UTF-8');
echo $title.…;} else {
echo $post->post_title;}
?></a>
<span>(<?php the_time('m.d.Y'); ?>)</span>
</h2>
<?php endwhile; ?>
</div>
<?php navi(); ?>
<div class="fb-activity" data-site="http://8bitnews.asia/" data-width="640" data-height="300" data-header="false" data-colorscheme="dark" data-linktarget="_parent" data-border-color="#000000" data-font="tahoma" data-recommendations="true"></div>
<?php else : ?>
<h3 class="archive">Not Found</h3>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php } elseif ( is_category( array("468") ) ) { ?>
<div id="main" class="cat_eve artist">
<?php $post = $posts[0]; ?>
<?php if (is_category()) : ?>
<h3 class="archive"><?php single_cat_title(); ?><span>(<?php 
global $wp_query;
echo $wp_query->found_posts;
?>)</span></h3>
<p class="music_eps">8bitNews投稿用の動画の挿入BGMとしてご利用いただけます。</p>
<?php endif; ?>
<div class="lists">
<?php
if (have_posts()) :
global $query_string;
query_posts( $query_string . "&posts_per_page=25&cat=468&paged=".$paged );
while (have_posts()) : the_post();
?>
<h2>
<a href="<?php the_permalink() ?>" class="listtex" rel="bookmark" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>">
<?php
if(mb_strlen($post->post_title,'UTF-8')>50) {
$title= mb_substr($post->post_title,0,50,'UTF-8');
echo $title.…;} else {
echo $post->post_title;}
?></a>
<span>(Join:<?php the_time('m.d.Y'); ?>)</span>
</h2>
<?php endwhile; ?>
</div>
<?php navi(); ?>
<div class="fb-activity" data-site="http://8bitnews.asia/" data-width="640" data-height="300" data-header="false" data-colorscheme="dark" data-linktarget="_parent" data-border-color="#000000" data-font="tahoma" data-recommendations="true"></div>
<?php else : ?>
<h3 class="archive">Not Found</h3>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>

</div>
<?php } else { ?>
<div id="main" class="cat">
<?php $post = $posts[0]; ?>
<?php if (is_category()) : ?>
<h3 class="archive"><?php single_cat_title(); ?>の一覧<span>(<?php 
global $wp_query;
echo $wp_query->found_posts;
 ?>件)</span></h3>
<?php elseif (is_day()) : ?>
<h3 class="archive"><?php printf('Daily Archives: <span>%s</span>', get_the_date() ); ?></h3>
<?php elseif (is_month()) : ?>
<h3 class="archive"><?php printf('Monthly Archives: <span>%s</span>', get_the_date( 'F Y' ) ); ?></h3>
<?php elseif (is_year()) : ?>
<h3 class="archive"><?php printf('Yearly Archives: <span>%s</span>', get_the_date( 'Y' ) ); ?></h3>
<?php elseif( is_tag() ) : ?>
<h3 class="archive">タグ：「<?php single_tag_title(); ?>」の一覧<span>(<?php $tag = $wp_query->get_queried_object(); echo $tag->count; ?>件)</span></h3>
<?php elseif (isset($_GET['paged']) && !empty($_GET['paged'])) : ?>
<h3 class="archive">Blog Archives</h3>
<?php endif; ?>
<div class="lists">
<?php
if (have_posts()) :
global $query_string;
query_posts( $query_string . "&posts_per_page=20&paged=".$paged );
while (have_posts()) : the_post();
?>
<h2>
<?php $youtubeUrl = post_custom('youtube'); ?>
<a href="<?php the_permalink() ?>" class="listimg" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>"><img src="http://img.youtube.com/vi/<?= $youtubeUrl ?>/default.jpg" alt="<?php echo substr(strip_tags(the_title()), 0, 30);  ?>" class="list_yt" height="60" /></a>
<div class="list_right">
<a href="<?php the_permalink() ?>" class="listtex" rel="bookmark" title="<?php the_title_attribute( array('before' => 'Permalink to: ', 'after' => '')); ?>">
<?php
if(mb_strlen($post->post_title,'UTF-8')>35) {
$title= mb_substr($post->post_title,0,35,'UTF-8');
echo $title.…;} else {
echo $post->post_title;}
?></a>
<span>(<?php the_time('m.d.Y'); ?>)</span>
</div>
</h2>
<?php endwhile; ?>
</div>
<?php navi(); ?>
<div class="fb-activity" data-site="http://8bitnews.asia/" data-width="640" data-height="300" data-header="false" data-colorscheme="dark" data-linktarget="_parent" data-border-color="#000000" data-font="tahoma" data-recommendations="true"></div>
<?php else : ?>
<h3 class="archive">Not Found</h3>
<p>Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php } ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>